﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageLayout.Master" AutoEventWireup="true" CodeBehind="frmGroup_Menu.aspx.cs" Inherits="BVVD_Website.userRight.frmGroup_Menu1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="server">
    <div id="Div1" class="mpBottomContent" runat="server">
        <asp:Label runat="server" ID="lblMenu" Style="margin: 0 auto 0 auto; font-family: 'Microsoft Sans Serif'; font-size: larger; color: forestgreen" Text="PHÂN QUYỀN NHÓM SỬ DỤNG - FORM"></asp:Label>

        <table style="margin: 0 auto 0 auto; border: 5px thin red; width: 90% !important; padding: 5px 5px 5px 5px">
            <caption style="float: left">
                <telerik:RadDropDownList DefaultMessage="Chọn nhóm" DropDownHeight="200" Skin="Hay"  OnSelectedIndexChanged="ddlGROUP_SelectedIndexChanged" AutoPostBack="true" runat="server" ID="ddlGROUP"></telerik:RadDropDownList>

            </caption>
            <tr>
                <td>
                    <telerik:RadGrid ID="grvGroup_User" Skin="Hay" AllowFilteringByColumn="true" MasterTableView-NoMasterRecordsText="Không tìm thấy bản ghi nào" MasterTableView-ShowHeadersWhenNoRecords="true" ClientSettings-ColumnsReorderMethod="Reorder" ClientSettings-AllowColumnsReorder="true" ClientSettings-Animation-AllowColumnReorderAnimation="true" ClientSettings-Animation-ColumnReorderAnimationDuration="300" PageSize="50" AllowSorting="true"  AutoGenerateColumns="false" AllowPaging="false" ClientSettings-AllowDragToGroup="true" OnNeedDataSource="grvGroup_User_NeedDataSource" OnItemCommand="grvGroup_User_ItemCommand" runat="server" >

                        <PagerStyle Mode="NextPrevAndNumeric" PageSizeControlType="RadComboBox" Wrap="true" AlwaysVisible="true" />

                        <MasterTableView CommandItemDisplay="TopAndBottom" EnableNoRecordsTemplate="true" CssClass="MasterClass" ShowFooter="true" EditMode="PopUp" Summary="SUMMARY" ShowHeadersWhenNoRecords="true"
                            DataKeyNames="RECID">
                            <CommandItemSettings AddNewRecordText="Thêm mới" RefreshText="Làm mới danh sách" ExportToPdfText="Xuất file dạng PDF" ShowExportToPdfButton="true"></CommandItemSettings>
                            <CommandItemSettings ExportToExcelText="Xuất file dạng Excel" ShowExportToExcelButton="true"></CommandItemSettings>

                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

                            <CommandItemTemplate>
                                <div style="padding: 5px 5px; float:right">

                                    <telerik:RadButton ButtonType="LinkButton" Skin="Metro" BorderStyle="None" Text="Lưu" runat="server" ID="lbtnSave"  CommandName="SavePQ">
                                        <Icon PrimaryIconCssClass="rbSave" PrimaryIconLeft="4" PrimaryIconRight="4" />
                                    </telerik:RadButton>
                                    &nbsp;&nbsp; 
                                    <%--<telerik:RadButton ID="LinkButton2" Skin="Telerik" ButtonType="StandardButton" runat="server" CommandName="InitInsert" Text="Thêm mới" Visible='<%# !grvGiayChungnhan.MasterTableView.IsItemInserted %>'></telerik:RadButton>&nbsp;&nbsp; --%>                   
                                    <telerik:RadButton ID="LinkButton4" Skin="Metro" BorderStyle="None" ButtonType="LinkButton" runat="server" CommandName="RebindGrid" Text="Làm mới danh sách">
                                        <Icon PrimaryIconCssClass="rbRefresh" PrimaryIconLeft="4" PrimaryIconRight="4" />
                                    </telerik:RadButton>
                                </div>
                            </CommandItemTemplate>

                            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True"></ExpandCollapseColumn>
                            <NoRecordsTemplate>
                                <div>
                                    Không có bản ghi nào
                                </div>
                            </NoRecordsTemplate>
                            <Columns>

                                <telerik:GridBoundColumn UniqueName="RECID" EditFormColumnIndex="1" Display="false" ReadOnly="true" HeaderText="" DataField="RECID">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text=""></ModelErrorMessage>
                                    </ColumnValidationSettings>
                                    <HeaderStyle ForeColor="Silver" Width="20px"></HeaderStyle>
                                    <ItemStyle ForeColor="Gray"></ItemStyle>
                                </telerik:GridBoundColumn>                                

                                <telerik:GridBoundColumn UniqueName="MAMN" Display="false" FilterControlWidth="70%" HeaderStyle-Width="20%" HeaderText="Mã menu" DataField="MAMN">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text=""></ModelErrorMessage>
                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn UniqueName="TENMN" ItemStyle-HorizontalAlign="Left" FilterControlWidth="70%" HeaderStyle-Width="20%" HeaderText="Tên menu" DataField="TENMN">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text=""></ModelErrorMessage>
                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>

                                <telerik:GridTemplateColumn UniqueName="SHOW" ItemStyle-HorizontalAlign="Center" AllowFiltering="false" DataType="System.Boolean" FilterControlWidth="70%" HeaderStyle-Width="10%" HeaderText="Hiển thị" DataField="SHOW">
                                     <ItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbShow" Checked='<%# DataBinder.Eval(Container.DataItem,"SHOW").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbShow1" Checked='<%# DataBinder.Eval(Container.DataItem,"SHOW").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>

                                <telerik:GridTemplateColumn UniqueName="ADD" ItemStyle-HorizontalAlign="Center" AllowFiltering="false" DataType="System.Boolean" FilterControlWidth="70%" HeaderStyle-Width="10%" HeaderText="Thêm mới" DataField="ADD">
                                     <ItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbAdd" Checked='<%# DataBinder.Eval(Container.DataItem,"ADD").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbAdd1" Checked='<%# DataBinder.Eval(Container.DataItem,"ADD").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>

                                <telerik:GridTemplateColumn UniqueName="EDIT" ItemStyle-HorizontalAlign="Center" AllowFiltering="false" DataType="System.Boolean" FilterControlWidth="70%" HeaderStyle-Width="10%" HeaderText="Sửa" DataField="EDIT">
                                     <ItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbEdit" Checked='<%# DataBinder.Eval(Container.DataItem,"EDIT").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbEdit1" Checked='<%# DataBinder.Eval(Container.DataItem,"EDIT").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>

                                <telerik:GridTemplateColumn UniqueName="DELETE" ItemStyle-HorizontalAlign="Center" AllowFiltering="false" DataType="System.Boolean" FilterControlWidth="70%" HeaderStyle-Width="10%" HeaderText="Xóa" DataField="DELETE">
                                     <ItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbDelete" Checked='<%# DataBinder.Eval(Container.DataItem,"DELETE").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:CheckBox runat="server" ID="chbDelete1" Checked='<%# DataBinder.Eval(Container.DataItem,"DELETE").ToString().Equals("1")?true:false %>'></asp:CheckBox>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>

                                


                                <telerik:GridBoundColumn UniqueName="TRANGTHAI" ItemStyle-HorizontalAlign="Left"  FilterControlWidth="70%" Display="false" HeaderStyle-Width="30%" HeaderText="Trạng thái" DataField="TRANGTHAI">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text=""></ModelErrorMessage>
                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>


                                <telerik:GridBoundColumn UniqueName="GHICHU" ItemStyle-HorizontalAlign="Left"  FilterControlWidth="70%" Display="false" HeaderStyle-Width="30%" HeaderText="Ghi chú" DataField="GHICHU">
                                    <ColumnValidationSettings>
                                        <ModelErrorMessage Text=""></ModelErrorMessage>
                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>

                                <%--<telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" HeaderText="Xóa" ItemStyle-Width="60" HeaderStyle-Width="60" ConfirmDialogType="RadWindow" ConfirmTextFormatString="Bạn chắc chắn muốn xóa bản ghi : \n\n Số giấy chứng nhận : {0} <br>\t Mã lớp học : {1} <br> \n\t Mã học viên :  {2} \n " ConfirmTextFields="SOGCN,MALH, MAHV" ConfirmTitle="Xác nhận xóa" ConfirmText="Xóa, Hủy" Text="Xóa" UniqueName="btnDelete">
                                </telerik:GridButtonColumn>--%>
                            </Columns>
                            <EditFormSettings EditFormType="AutoGenerated" PopUpSettings-ScrollBars="Auto" PopUpSettings-ShowCaptionInEditForm="true" PopUpSettings-Width="600"  PopUpSettings-ZIndex="4000" InsertCaption="Thêm mới giấy chứng nhận " PopUpSettings-Modal="true" CaptionFormatString="Số giấy chứng nhận {0}" CaptionDataField="SOGCN">
                                
                            </EditFormSettings>
                        </MasterTableView>
                        <ClientSettings>
                            <ClientEvents OnPopUpShowing="PopUpShowing" />
                            <%--<ClientEvents OnRowDblClick="RowDblClick" />--%>
                            <Selecting AllowRowSelect="true" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            <Animation AllowColumnReorderAnimation="true" ColumnReorderAnimationDuration="500" />

                        </ClientSettings>
                        <ExportSettings Excel-Format="Biff" Pdf-DefaultFontFamily="Arial" FileName="Mydata" IgnorePaging="false" Excel-AutoFitImages="true" Excel-FileExtension="xls" HideStructureColumns="true"></ExportSettings>
                    </telerik:RadGrid>
                </td>
            </tr>
        </table>
    </div>

    <telerik:RadNotification ID="rnAlert" runat="server" Width="300" Position="TopRight" EnableRoundedCorners="true"
        EnableShadow="true" Skin="Hay" Overlay="true" Animation="Fade" ContentScrolling="Auto" AnimationDuration="1000" Title="Thông báo">
    </telerik:RadNotification>
</asp:Content>
